f7d948
@@ -152,6 +152,8 @@
public Object topObj() {
 
   transient boolean handleSkewJoin = false;
 
+  transient boolean hasLeftSemiJoin = false;
+
   protected transient int countAfterReport;
   protected transient int heartbeatInterval;
   protected static final int NOTSKIPBIGTABLE = -1;
@@ -324,6 +326,13 @@
protected void initializeOp(Configuration hconf) throws HiveException {
 
     outputObjInspector = getJoinOutputObjectInspector(order,
         joinValuesStandardObjectInspectors, conf);
+
+    for( int i = 0; i < condn.length; i++ ) {
+      if(condn[i].getType() == JoinDesc.LEFT_SEMI_JOIN) {
+        hasLeftSemiJoin = true;
+      }
+    }
+
     LOG.info("JOIN "
         + ((StructObjectInspector) outputObjInspector).getTypeName()
         + " totalsz = " + totalSz);
@@ -835,7 +844,7 @@
protected void checkAndGenObject() throws HiveException {
         LOG.trace("calling genAllOneUniqueJoinObject");
         genAllOneUniqueJoinObject();
         LOG.trace("called genAllOneUniqueJoinObject");
-      } else if (!hasEmpty) {
+      } else if (!hasEmpty && !hasLeftSemiJoin) {
         LOG.trace("calling genUniqueJoinObject");
         genUniqueJoinObject(0, 0);
         LOG.trace("called genUniqueJoinObject");
